<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<ul>
		<li><a href="<?php echo U('Type/add');?>">添加最大分类</a></li>
		<?php if(is_array($result)): foreach($result as $key=>$vo): ?><li style="text-indent:<?php echo ($vo['level']*30); ?>px;">
			<?php echo ($vo['name']); ?>
			<a href="<?php echo U('Type/add', ['pid'=>$vo['id']]);?>">添加子类</a>
			<a href="">修改</a>
			<!-- 必须通知一下对应的控制器方法是否可以做删除 -->
			<a href="<?php echo U('Type/destroy', ['id'=>$vo['id'], 'childs'=>$vo['childs']]);?>">禁用</a>
		</li><?php endforeach; endif; ?>
	</ul>
</body>
</html>